// 引入秒杀列表接口
import {seckList} from '../../../request/api'

const state = {
    secklist: []
}
const mutations = {
    REQ_SECKLIST(state, payload) {
        state.secklist = payload
    }
}
const actions = {
    async changeSeckAction({
        commit
    }) {
        let res = await seckList();
        // console.log(res,'秒杀列表');
        commit('REQ_SECKLIST', res.list)
    }
}
const getters = {
    getSeckList(state) {
        return state.secklist;
    }
}
export default {
    state,
    mutations,
    actions,
    getters,
    namespaced: true
}